Component({
  properties: {
    questions: Array,
    currentIndex: Number,
    answeredQuestions: Array,
    userAnswers: Object,  
    isDarkMode: Boolean    // 新增
  },
  data: {
    showNavigator: false,
  },
  methods: {
    toggleNavigator() {
      this.setData({ showNavigator: !this.data.showNavigator });
    },
    goToQuestion(e) {
      const index = e.currentTarget.dataset.index;
      this.triggerEvent('changeQuestion', { index });
      this.setData({ showNavigator: false });
    }
  }
});
